From: WhiredPlanck Date: Fri, 4 Jul 2025 19:57:30 +0000 (+0800) Subject: Fix deprecated declarations in C++17 X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=2414b725b4fb225e422aea5307e42966bcc37668;p=opencc.git Fix deprecated declarations in C++17 Gbp-Pq: Topic backport Gbp-Pq: Name 0007-Fix-deprecated-declarations-in-C-17.patch --- diff --git a/src/Segments.hpp b/src/Segments.hpp index 2186dfd..57320fe 100644 --- a/src/Segments.hpp +++ b/src/Segments.hpp @@ -18,6 +18,7 @@ #pragma once +#include #include #include "Common.hpp" @@ -53,8 +54,11 @@ public: managed.push_back(str); } - class iterator : public std::iterator { + class iterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = const char*; + iterator(const Segments* const _segments, size_t _cursor) : segments(_segments), cursor(_cursor) {}